﻿using System;

namespace KnowledgeKiosk
{
    /// <summary>
    /// EventArgs(Of T) is a generic class for describing event data with a single generic result.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class EventArgs<T> : EventArgs
    {
        private readonly T _result;

        /// <summary>
        /// Initializes a new instance of the EventArgs(Of T) class using the provided result.
        /// </summary>
        /// <param name="result"></param>
        public EventArgs(T result)
        {
            _result = result;
        }

        /// <summary>
        /// Gets the result
        /// </summary>
        public T Result
        {
            get { return _result; }
        }
    }
}